package com.onec.service.channel.service;

import com.onec.service.api.dto.request.channel.ChannelMerchantReq;
import com.onec.service.api.enums.StatusEnum;
import com.onec.service.channel.entity.ChannelInfo;
import com.onec.service.channel.entity.ChannelMerchantBusiness;

/**
 * @author onec
 */
public interface ChannelMerchantBusinessService {

    /**
     * 创建通道订单！
     *
     * @param channelInfo
     * @param channelMerchantReq
     * @return
     */
    ChannelMerchantBusiness create(ChannelInfo channelInfo, ChannelMerchantReq channelMerchantReq);

    /**
     * 创建通道订单！
     *
     * @param merchantNo
     * @param channelId
     * @return
     */
    ChannelMerchantBusiness findByMerchantNoChannelIdBusinessNo(String merchantNo, long channelId, String businessNo);

    /**
     * 通道返回成功，处理成功订单.
     * 商户注册等：
     *
     * @param
     * @return
     */
    ChannelMerchantBusiness updateByMerchantNoBusinessNo(long channelId, String businessNo, StatusEnum statusEnum,
                                                         String merchantNo, String channelMerchantNo, String message);
}
